package com.two.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "用户评论信息", description = "")
public class Pinglun {

    @ApiModelProperty("评论id")
    @TableId(value = "pinglunid", type = IdType.AUTO)
    private Integer pinglunid;



    @ApiModelProperty("用户留言")
    private String say;
    @ApiModelProperty("留言时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date saytime;


//    @ApiModelProperty("餐厅名")
//    private String restaurantname;
    @TableLogic
    private Integer isDeleted;

//    @ApiModelProperty("用户账号")
//    private String username;
    @ApiModelProperty("菜名")
    private String dishName;
    @ApiModelProperty("餐厅id")
    private Integer rid;
    @ApiModelProperty("用户昵称")
    private String usermonicker;

    @TableField(exist = false)
    private Restaurant restaurant;
    @TableField(exist = false)
    private User user;
}
